.class public Lcom/htc/android/footprints/kml/KMLUtil;
.super Ljava/lang/Object;
.source "KMLUtil.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "KMLUtil"

.field private static final TAG_ADDRESS:Ljava/lang/String; = "address"

.field private static final TAG_COORDINATES:Ljava/lang/String; = "coordinates"

.field private static final TAG_DESCRIPTION:Ljava/lang/String; = "description"

.field private static final TAG_Data:Ljava/lang/String; = "Data"

.field private static final TAG_NAME:Ljava/lang/String; = "name"

.field private static final TAG_PHONENUMBER:Ljava/lang/String; = "phoneNumber"

.field private static final TAG_PLACEMARK:Ljava/lang/String; = "Placemark"

.field private static final TAG_TimeStamp:Ljava/lang/String; = "TimeStamp"

.field private static final TAG_VALUE:Ljava/lang/String; = "value"

.field private static final TAG_WHEN:Ljava/lang/String; = "when"

.field private static mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

.field private static timeFormat:Ljava/text/SimpleDateFormat;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 300
    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string v1, "yyyy-MM-dd\'T\'hh:mm:ss\'Z\'"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/htc/android/footprints/kml/KMLUtil;->timeFormat:Ljava/text/SimpleDateFormat;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 478
    return-void
.end method

.method public static convertKML([Lcom/htc/android/footprints/vo/Footprint;)Lcom/htc/android/footprints/kml/KMLDocument;
    .locals 11
    .parameter "footprints"

    .prologue
    const-string v10, "comment"

    .line 43
    new-instance v6, Lcom/htc/android/footprints/kml/KMLDocument;

    invoke-direct {v6}, Lcom/htc/android/footprints/kml/KMLDocument;-><init>()V

    .line 44
    .local v6, result:Lcom/htc/android/footprints/kml/KMLDocument;
    new-instance v5, Ljava/util/ArrayList;

    array-length v7, p0

    invoke-direct {v5, v7}, Ljava/util/ArrayList;-><init>(I)V

    .line 46
    .local v5, placemarkList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/kml/KMLPlacemark;>;"
    move-object v0, p0

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v2, v0

    .local v2, len$:I
    const/4 v1, 0x0

    .local v1, i$:I
    :goto_0
    if-ge v1, v2, :cond_5

    aget-object v3, v0, v1

    .line 47
    .local v3, p:Lcom/htc/android/footprints/vo/Footprint;
    new-instance v4, Lcom/htc/android/footprints/kml/KMLPlacemark;

    invoke-direct {v4}, Lcom/htc/android/footprints/kml/KMLPlacemark;-><init>()V

    .line 48
    .local v4, placemark:Lcom/htc/android/footprints/kml/KMLPlacemark;
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    iput-object v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->name:Ljava/lang/String;

    .line 49
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mAddr:Ljava/lang/String;

    iput-object v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->address:Ljava/lang/String;

    .line 50
    iget-wide v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    iput-wide v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->when:J

    .line 51
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mTel:Ljava/lang/String;

    iput-object v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->phoneNumber:Ljava/lang/String;

    .line 52
    iget v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    iput v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->latitudeE6:I

    .line 53
    iget v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    iput v7, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->longitudeE6:I

    .line 54
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    invoke-virtual {v4, v7}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setTextDescription(Ljava/lang/String;)V

    .line 57
    const-string v7, "create_time"

    iget-wide v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    invoke-static {v8, v9}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 58
    const-string v7, "footprintid"

    iget-wide v8, v4, Lcom/htc/android/footprints/kml/KMLPlacemark;->when:J

    invoke-static {v8, v9}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/htc/android/footprints/utils/FootprintUtils;->generateMD5(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 60
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    if-eqz v7, :cond_4

    .line 61
    const-string v7, "comment"

    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    invoke-virtual {v4, v10, v7}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 64
    :goto_1
    const-string v7, "accuracy"

    iget v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 67
    const-string v7, "version"

    iget v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mVersion:I

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 69
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    if-eqz v7, :cond_0

    .line 70
    const-string v7, "audio"

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 74
    :cond_0
    const-string v7, "rate"

    iget v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mRate:I

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 76
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    if-eqz v7, :cond_1

    .line 77
    const-string v7, "website"

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 79
    :cond_1
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    if-eqz v7, :cond_2

    .line 80
    const-string v7, "category"

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 83
    :cond_2
    iget-object v7, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    if-eqz v7, :cond_3

    .line 84
    const-string v7, "image"

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    invoke-virtual {v4, v7, v8}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    .line 86
    :cond_3
    invoke-virtual {v5, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 46
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_0

    .line 62
    :cond_4
    const-string v7, "comment"

    const-string v7, ""

    invoke-virtual {v4, v10, v7}, Lcom/htc/android/footprints/kml/KMLPlacemark;->setExtendData(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 89
    .end local v3           #p:Lcom/htc/android/footprints/vo/Footprint;
    .end local v4           #placemark:Lcom/htc/android/footprints/kml/KMLPlacemark;
    :cond_5
    iput-object v5, v6, Lcom/htc/android/footprints/kml/KMLDocument;->placemarksList:Ljava/util/ArrayList;

    .line 90
    return-object v6
.end method

.method public static exportKMZ([Lcom/htc/android/footprints/vo/Footprint;Ljava/io/OutputStream;)V
    .locals 11
    .parameter "footprints"
    .parameter "os"

    .prologue
    const-string v10, ""

    .line 444
    new-instance v6, Ljava/util/HashSet;

    invoke-direct {v6}, Ljava/util/HashSet;-><init>()V

    .line 445
    .local v6, imageSet:Ljava/util/HashSet;,"Ljava/util/HashSet<Ljava/io/File;>;"
    new-instance v2, Ljava/util/HashSet;

    invoke-direct {v2}, Ljava/util/HashSet;-><init>()V

    .line 446
    .local v2, audioSet:Ljava/util/HashSet;,"Ljava/util/HashSet<Ljava/io/File;>;"
    move-object v0, p0

    .local v0, arr$:[Lcom/htc/android/footprints/vo/Footprint;
    array-length v7, v0

    .local v7, len$:I
    const/4 v4, 0x0

    .local v4, i$:I
    :goto_0
    if-ge v4, v7, :cond_2

    aget-object v3, v0, v4

    .line 447
    .local v3, f:Lcom/htc/android/footprints/vo/Footprint;
    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    if-eqz v8, :cond_0

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    const-string v9, ""

    invoke-virtual {v8, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_0

    .line 448
    new-instance v8, Ljava/io/File;

    iget-object v9, v3, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    invoke-direct {v8, v9}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v8}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 451
    :cond_0
    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    if-eqz v8, :cond_1

    iget-object v8, v3, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    const-string v9, ""

    invoke-virtual {v8, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_1

    .line 452
    new-instance v8, Ljava/io/File;

    iget-object v9, v3, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    invoke-direct {v8, v9}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v8}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 446
    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 455
    .end local v3           #f:Lcom/htc/android/footprints/vo/Footprint;
    :cond_2
    invoke-virtual {v6}, Ljava/util/HashSet;->size()I

    move-result v8

    new-array v8, v8, [Ljava/io/File;

    invoke-virtual {v6, v8}, Ljava/util/HashSet;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v5

    check-cast v5, [Ljava/io/File;

    .line 456
    .local v5, imageFile:[Ljava/io/File;
    invoke-virtual {v2}, Ljava/util/HashSet;->size()I

    move-result v8

    new-array v8, v8, [Ljava/io/File;

    invoke-virtual {v2, v8}, Ljava/util/HashSet;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [Ljava/io/File;

    .line 457
    .local v1, audioFile:[Ljava/io/File;
    sget-object v8, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz v8, :cond_3

    .line 458
    sget-object v8, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    const/16 v9, 0xa

    invoke-interface {v8, v9}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    .line 460
    :cond_3
    invoke-static {p0}, Lcom/htc/android/footprints/kml/KMLUtil;->convertKML([Lcom/htc/android/footprints/vo/Footprint;)Lcom/htc/android/footprints/kml/KMLDocument;

    move-result-object v8

    invoke-static {v8, p1, v5, v1}, Lcom/htc/android/footprints/kml/KMLUtil;->writeToKMZ(Lcom/htc/android/footprints/kml/KMLDocument;Ljava/io/OutputStream;[Ljava/io/File;[Ljava/io/File;)V

    .line 461
    sget-object v8, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz v8, :cond_4

    .line 462
    sget-object v8, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    invoke-interface {v8}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onEnd()V

    .line 464
    :cond_4
    return-void
.end method

.method public static getDirectory()Ljava/lang/String;
    .locals 2

    .prologue
    .line 467
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getExternalStorageDirectory()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "footprint_export_files"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getOuputFile(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "fileName"

    .prologue
    .line 473
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getExternalStorageDirectory()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "footprint_export_files"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ".kmz"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static importKMZ(Ljava/io/InputStream;)[Lcom/htc/android/footprints/vo/Footprint;
    .locals 12
    .parameter "in"

    .prologue
    const/4 v9, 0x0

    const-string v11, "KMLUtil"

    .line 234
    new-instance v3, Ljava/util/zip/ZipInputStream;

    new-instance v8, Ljava/io/BufferedInputStream;

    invoke-direct {v8, p0}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V

    invoke-direct {v3, v8}, Ljava/util/zip/ZipInputStream;-><init>(Ljava/io/InputStream;)V

    .line 235
    .local v3, input:Ljava/util/zip/ZipInputStream;
    new-array v6, v9, [Lcom/htc/android/footprints/vo/Footprint;

    .line 239
    .local v6, result:[Lcom/htc/android/footprints/vo/Footprint;
    const/16 v8, 0x1000

    :try_start_0
    new-array v0, v8, [B

    .line 240
    .local v0, buf:[B
    :cond_0
    :goto_0
    invoke-virtual {v3}, Ljava/util/zip/ZipInputStream;->getNextEntry()Ljava/util/zip/ZipEntry;

    move-result-object v2

    .local v2, entry:Ljava/util/zip/ZipEntry;
    if-eqz v2, :cond_7

    .line 241
    invoke-virtual {v2}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v8

    const-string v9, "doc.kml"

    invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-eqz v8, :cond_1

    .line 242
    new-instance v8, Ljava/io/BufferedReader;

    new-instance v9, Ljava/io/InputStreamReader;

    const-string v10, "UTF-8"

    invoke-direct {v9, v3, v10}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    invoke-direct {v8, v9}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    invoke-static {v8}, Lcom/htc/android/footprints/kml/KMLUtil;->parseKML(Ljava/io/Reader;)[Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v6

    goto :goto_0

    .line 243
    :cond_1
    invoke-virtual {v2}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v8

    const-string v9, ".jpg"

    invoke-virtual {v8, v9}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_4

    .line 244
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getDirectory()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    sget-object v9, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v2}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 247
    .local v7, target:Ljava/lang/String;
    new-instance v5, Ljava/io/FileOutputStream;

    invoke-direct {v5, v7}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 250
    .local v5, out:Ljava/io/FileOutputStream;
    :goto_1
    invoke-virtual {v3, v0}, Ljava/util/zip/ZipInputStream;->read([B)I

    move-result v4

    .local v4, len:I
    if-lez v4, :cond_3

    .line 251
    const/4 v8, 0x0

    invoke-virtual {v5, v0, v8, v4}, Ljava/io/FileOutputStream;->write([BII)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_1

    .line 272
    .end local v0           #buf:[B
    .end local v2           #entry:Ljava/util/zip/ZipEntry;
    .end local v4           #len:I
    .end local v5           #out:Ljava/io/FileOutputStream;
    .end local v7           #target:Ljava/lang/String;
    :catch_0
    move-exception v8

    move-object v1, v8

    .line 273
    .local v1, e:Ljava/io/IOException;
    :try_start_1
    const-string v8, "KMLUtil"

    invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 278
    if-eqz v3, :cond_2

    :try_start_2
    invoke-virtual {v3}, Ljava/util/zip/ZipInputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_4

    .line 285
    .end local v1           #e:Ljava/io/IOException;
    :cond_2
    :goto_2
    return-object v6

    .line 253
    .restart local v0       #buf:[B
    .restart local v2       #entry:Ljava/util/zip/ZipEntry;
    .restart local v4       #len:I
    .restart local v5       #out:Ljava/io/FileOutputStream;
    .restart local v7       #target:Ljava/lang/String;
    :cond_3
    :try_start_3
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->flush()V

    .line 254
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->getFD()Ljava/io/FileDescriptor;

    move-result-object v8

    invoke-virtual {v8}, Ljava/io/FileDescriptor;->sync()V

    .line 255
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->close()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_0
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_0

    .line 274
    .end local v0           #buf:[B
    .end local v2           #entry:Ljava/util/zip/ZipEntry;
    .end local v4           #len:I
    .end local v5           #out:Ljava/io/FileOutputStream;
    .end local v7           #target:Ljava/lang/String;
    :catch_1
    move-exception v8

    move-object v1, v8

    .line 275
    .local v1, e:Lorg/xmlpull/v1/XmlPullParserException;
    :try_start_4
    const-string v8, "KMLUtil"

    invoke-virtual {v1}, Lorg/xmlpull/v1/XmlPullParserException;->getMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 278
    if-eqz v3, :cond_2

    :try_start_5
    invoke-virtual {v3}, Ljava/util/zip/ZipInputStream;->close()V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_2

    goto :goto_2

    .line 279
    :catch_2
    move-exception v1

    .line 280
    .local v1, e:Ljava/io/IOException;
    const-string v8, "KMLUtil"

    invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-static {v11, v8, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_2

    .line 256
    .end local v1           #e:Ljava/io/IOException;
    .restart local v0       #buf:[B
    .restart local v2       #entry:Ljava/util/zip/ZipEntry;
    :cond_4
    :try_start_6
    invoke-virtual {v2}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v8

    const-string v9, ".amr"

    invoke-virtual {v8, v9}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_0

    .line 257
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/voice/FootprintVoiceManager;->getDirectory()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    sget-object v9, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v2}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 260
    .restart local v7       #target:Ljava/lang/String;
    new-instance v5, Ljava/io/FileOutputStream;

    invoke-direct {v5, v7}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 262
    .restart local v5       #out:Ljava/io/FileOutputStream;
    :goto_3
    invoke-virtual {v3, v0}, Ljava/util/zip/ZipInputStream;->read([B)I

    move-result v4

    .restart local v4       #len:I
    if-lez v4, :cond_6

    .line 263
    const/4 v8, 0x0

    invoke-virtual {v5, v0, v8, v4}, Ljava/io/FileOutputStream;->write([BII)V
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_0
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_0
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_6 .. :try_end_6} :catch_1

    goto :goto_3

    .line 277
    .end local v0           #buf:[B
    .end local v2           #entry:Ljava/util/zip/ZipEntry;
    .end local v4           #len:I
    .end local v5           #out:Ljava/io/FileOutputStream;
    .end local v7           #target:Ljava/lang/String;
    :catchall_0
    move-exception v8

    .line 278
    if-eqz v3, :cond_5

    :try_start_7
    invoke-virtual {v3}, Ljava/util/zip/ZipInputStream;->close()V
    :try_end_7
    .catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_5

    .line 281
    :cond_5
    :goto_4
    throw v8

    .line 265
    .restart local v0       #buf:[B
    .restart local v2       #entry:Ljava/util/zip/ZipEntry;
    .restart local v4       #len:I
    .restart local v5       #out:Ljava/io/FileOutputStream;
    .restart local v7       #target:Ljava/lang/String;
    :cond_6
    :try_start_8
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->flush()V

    .line 266
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->getFD()Ljava/io/FileDescriptor;

    move-result-object v8

    invoke-virtual {v8}, Ljava/io/FileDescriptor;->sync()V

    .line 267
    invoke-virtual {v5}, Ljava/io/FileOutputStream;->close()V
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_0
    .catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_0
    .catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_8 .. :try_end_8} :catch_1

    goto/16 :goto_0

    .line 278
    .end local v4           #len:I
    .end local v5           #out:Ljava/io/FileOutputStream;
    .end local v7           #target:Ljava/lang/String;
    :cond_7
    if-eqz v3, :cond_2

    :try_start_9
    invoke-virtual {v3}, Ljava/util/zip/ZipInputStream;->close()V
    :try_end_9
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_3

    goto/16 :goto_2

    .line 279
    :catch_3
    move-exception v1

    .line 280
    .restart local v1       #e:Ljava/io/IOException;
    const-string v8, "KMLUtil"

    invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-static {v11, v8, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_2

    .line 279
    .end local v0           #buf:[B
    .end local v2           #entry:Ljava/util/zip/ZipEntry;
    :catch_4
    move-exception v1

    .line 280
    const-string v8, "KMLUtil"

    invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-static {v11, v8, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_2

    .line 279
    .end local v1           #e:Ljava/io/IOException;
    :catch_5
    move-exception v1

    .line 280
    .restart local v1       #e:Ljava/io/IOException;
    const-string v9, "KMLUtil"

    invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object v9

    invoke-static {v11, v9, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_4
.end method

.method public static parseKML(Ljava/io/Reader;)[Lcom/htc/android/footprints/vo/Footprint;
    .locals 22
    .parameter "reader"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/xmlpull/v1/XmlPullParserException;,
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 305
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    .line 306
    .local v5, fList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    const/4 v3, 0x0

    .line 308
    .local v3, curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {}, Lorg/xmlpull/v1/XmlPullParserFactory;->newInstance()Lorg/xmlpull/v1/XmlPullParserFactory;

    move-result-object v4

    .line 310
    .local v4, factory:Lorg/xmlpull/v1/XmlPullParserFactory;
    invoke-virtual {v4}, Lorg/xmlpull/v1/XmlPullParserFactory;->newPullParser()Lorg/xmlpull/v1/XmlPullParser;

    move-result-object v16

    .line 311
    .local v16, xpp:Lorg/xmlpull/v1/XmlPullParser;
    move-object/from16 v0, v16

    move-object/from16 v1, p0

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->setInput(Ljava/io/Reader;)V

    .line 312
    const/4 v6, 0x0

    .line 313
    .local v6, inPlacemark:Z
    const/16 p0, 0x0

    .line 315
    .local p0, curTag:Ljava/lang/String;
    const/4 v14, 0x0

    .line 316
    .local v14, isRate:Z
    const/4 v8, 0x0

    .line 317
    .local v8, isAudio:Z
    const/4 v13, 0x0

    .line 318
    .local v13, isImage:Z
    const/4 v15, 0x0

    .line 319
    .local v15, isWebSite:Z
    const/4 v9, 0x0

    .line 320
    .local v9, isCategory:Z
    const/4 v7, 0x0

    .line 321
    .local v7, isAccuracy:Z
    const/4 v10, 0x0

    .line 322
    .local v10, isComment:Z
    const/4 v12, 0x0

    .line 323
    .local v12, isFootprintHashID:Z
    const/4 v11, 0x0

    .line 325
    .local v11, isCreateTime:Z
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getEventType()I

    move-result v4

    .local v4, eventType:I
    move-object/from16 v21, p0

    .end local p0           #curTag:Ljava/lang/String;
    .local v21, curTag:Ljava/lang/String;
    move-object/from16 p0, v3

    .end local v3           #curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    .local p0, curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    move-object/from16 v3, v21

    .line 327
    .end local v21           #curTag:Ljava/lang/String;
    .local v3, curTag:Ljava/lang/String;
    :cond_0
    if-nez v4, :cond_2

    .line 433
    .end local v4           #eventType:I
    :cond_1
    :goto_0
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->next()I

    move-result v4

    .line 434
    .restart local v4       #eventType:I
    const/16 v17, 0x1

    move v0, v4

    move/from16 v1, v17

    if-ne v0, v1, :cond_0

    .line 435
    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result p0

    .end local p0           #curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    move/from16 v0, p0

    new-array v0, v0, [Lcom/htc/android/footprints/vo/Footprint;

    move-object/from16 p0, v0

    move-object v0, v5

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object p0

    check-cast p0, [Lcom/htc/android/footprints/vo/Footprint;

    return-object p0

    .line 329
    .restart local p0       #curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    :cond_2
    const/16 v17, 0x1

    move v0, v4

    move/from16 v1, v17

    if-eq v0, v1, :cond_1

    .line 330
    const/16 v17, 0x2

    move v0, v4

    move/from16 v1, v17

    if-ne v0, v1, :cond_c

    .line 331
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;

    move-result-object v4

    .line 332
    .local v4, startTagName:Ljava/lang/String;
    const-string v17, "Placemark"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_3

    .line 333
    const/4 v4, 0x1

    .line 334
    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    new-instance p0, Lcom/htc/android/footprints/vo/Footprint;

    .end local p0           #curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-direct/range {p0 .. p0}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 335
    .restart local p0       #curFootPrint:Lcom/htc/android/footprints/vo/Footprint;
    move-object v0, v5

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    :goto_1
    move v15, v14

    .end local v14           #isWebSite:Z
    .restart local v15       #isWebSite:Z
    move v14, v13

    .end local v13           #isRate:Z
    .local v14, isRate:Z
    move v13, v12

    .end local v12           #isImage:Z
    .local v13, isImage:Z
    move v12, v11

    .end local v11           #isFootprintHashID:Z
    .local v12, isFootprintHashID:Z
    move v11, v10

    .end local v10           #isCreateTime:Z
    .local v11, isCreateTime:Z
    move v10, v9

    .end local v9           #isComment:Z
    .local v10, isComment:Z
    move v9, v8

    .end local v8           #isCategory:Z
    .local v9, isCategory:Z
    move v8, v7

    .end local v7           #isAudio:Z
    .local v8, isAudio:Z
    move v7, v6

    .end local v6           #isAccuracy:Z
    .local v7, isAccuracy:Z
    move v6, v4

    .line 365
    .end local v4           #inPlacemark:Z
    .local v6, inPlacemark:Z
    goto :goto_0

    .line 336
    .local v4, startTagName:Ljava/lang/String;
    :cond_3
    const-string v17, "name"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_4

    if-eqz v6, :cond_4

    .line 337
    const-string v3, "name"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto :goto_1

    .line 338
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_4
    const-string v17, "description"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_5

    if-eqz v6, :cond_5

    .line 339
    const-string v3, "description"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto :goto_1

    .line 340
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_5
    const-string v17, "coordinates"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_6

    if-eqz v6, :cond_6

    .line 341
    const-string v3, "coordinates"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto :goto_1

    .line 342
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_6
    const-string v17, "address"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_7

    if-eqz v6, :cond_7

    .line 343
    const-string v3, "address"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto :goto_1

    .line 344
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_7
    const-string v17, "phoneNumber"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_8

    if-eqz v6, :cond_8

    .line 345
    const-string v3, "phoneNumber"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1

    .line 346
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_8
    const-string v17, "TimeStamp"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_9

    if-eqz v6, :cond_9

    .line 347
    const-string v3, "TimeStamp"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1

    .line 348
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_9
    const-string v17, "when"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_a

    if-eqz v6, :cond_a

    .line 349
    const-string v4, "TimeStamp"

    .end local v4           #startTagName:Ljava/lang/String;
    if-ne v3, v4, :cond_1b

    .line 350
    const-string v3, "when"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1

    .line 352
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_a
    const-string v17, "Data"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_b

    if-eqz v6, :cond_b

    .line 353
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    .end local v4           #startTagName:Ljava/lang/String;
    move-result-object v4

    const-string v7, "rate"

    .end local v7           #isAccuracy:Z
    invoke-virtual {v4, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v13

    .line 354
    .end local v14           #isRate:Z
    .local v13, isRate:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v7, "audio"

    invoke-virtual {v4, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    .line 355
    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v8, "image"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v12

    .line 356
    .local v12, isImage:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v8, "website"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    .line 357
    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v8, "comment"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    .line 358
    .end local v10           #isComment:Z
    .local v9, isComment:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v8, "category"

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    .line 359
    .local v8, isCategory:Z
    const/4 v4, 0x0

    move-object/from16 v0, v16

    move v1, v4

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v4

    const-string v10, "accuracy"

    invoke-virtual {v4, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    .line 360
    .local v4, isAccuracy:Z
    const/4 v10, 0x0

    move-object/from16 v0, v16

    move v1, v10

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v10

    const-string v11, "create_time"

    .end local v11           #isCreateTime:Z
    invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    .line 361
    .local v10, isCreateTime:Z
    const/4 v11, 0x0

    move-object/from16 v0, v16

    move v1, v11

    invoke-interface {v0, v1}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(I)Ljava/lang/String;

    move-result-object v11

    const-string v15, "create_time"

    invoke-virtual {v11, v15}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    .local v11, isFootprintHashID:Z
    move/from16 v21, v4

    .end local v4           #isAccuracy:Z
    .local v21, isAccuracy:Z
    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move/from16 v6, v21

    .end local v21           #isAccuracy:Z
    .local v6, isAccuracy:Z
    goto/16 :goto_1

    .line 362
    .local v4, startTagName:Ljava/lang/String;
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_b
    const-string v17, "value"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    .end local v4           #startTagName:Ljava/lang/String;
    if-eqz v4, :cond_1c

    if-eqz v6, :cond_1b

    .line 363
    const-string v3, "value"

    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1

    .line 365
    .local v4, eventType:I
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_c
    const/16 v17, 0x3

    move v0, v4

    move/from16 v1, v17

    if-ne v0, v1, :cond_e

    .line 366
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;

    move-result-object v4

    .line 367
    .local v4, endTagName:Ljava/lang/String;
    const-string v17, "Placemark"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    .end local v4           #endTagName:Ljava/lang/String;
    if-eqz v4, :cond_d

    .line 368
    const/4 v4, 0x0

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    :goto_2
    move v6, v4

    .line 372
    .end local v4           #inPlacemark:Z
    .restart local v6       #inPlacemark:Z
    goto/16 :goto_0

    .line 370
    :cond_d
    const/4 v3, 0x0

    move v4, v6

    .end local v6           #inPlacemark:Z
    .restart local v4       #inPlacemark:Z
    goto :goto_2

    .line 372
    .local v4, eventType:I
    .restart local v6       #inPlacemark:Z
    :cond_e
    const/16 v17, 0x4

    move v0, v4

    move/from16 v1, v17

    if-ne v0, v1, :cond_1

    .line 373
    const-string v4, "name"

    .end local v4           #eventType:I
    if-ne v3, v4, :cond_f

    .line 374
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    goto/16 :goto_0

    .line 375
    :cond_f
    const-string v4, "description"

    if-eq v3, v4, :cond_1

    .line 378
    const-string v4, "coordinates"

    if-ne v3, v4, :cond_10

    .line 379
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    const-string v17, ","

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    const/16 v17, 0x0

    aget-object v4, v4, v17

    invoke-static {v4}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v17

    const-wide v19, 0x412e848000000000L

    mul-double v17, v17, v19

    move-wide/from16 v0, v17

    double-to-int v0, v0

    move v4, v0

    move v0, v4

    move-object/from16 v1, p0

    iput v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mLongitude:I

    .line 381
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    const-string v17, ","

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    const/16 v17, 0x1

    aget-object v4, v4, v17

    invoke-static {v4}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v17

    const-wide v19, 0x412e848000000000L

    mul-double v17, v17, v19

    move-wide/from16 v0, v17

    double-to-int v0, v0

    move v4, v0

    move v0, v4

    move-object/from16 v1, p0

    iput v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mLatitude:I

    goto/16 :goto_0

    .line 383
    :cond_10
    const-string v4, "address"

    if-ne v3, v4, :cond_11

    .line 384
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mAddr:Ljava/lang/String;

    goto/16 :goto_0

    .line 385
    :cond_11
    const-string v4, "phoneNumber"

    if-ne v3, v4, :cond_12

    .line 386
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mTel:Ljava/lang/String;

    goto/16 :goto_0

    .line 387
    :cond_12
    const-string v4, "when"

    if-eq v3, v4, :cond_1

    .line 395
    const-string v4, "value"

    if-ne v3, v4, :cond_1

    .line 396
    if-eqz v14, :cond_13

    .line 397
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v4

    move v0, v4

    move-object/from16 v1, p0

    iput v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mRate:I

    goto/16 :goto_0

    .line 398
    :cond_13
    if-eqz v8, :cond_14

    .line 399
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    .line 400
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    move-object v4, v0

    const-string v17, ""

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 401
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/voice/FootprintVoiceManager;->getDirectory()Ljava/lang/String;

    move-result-object v17

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v17, Ljava/io/File;->separator:Ljava/lang/String;

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mAudioFileName:Ljava/lang/String;

    move-object/from16 v17, v0

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mAudioPath:Ljava/lang/String;

    goto/16 :goto_0

    .line 406
    :cond_14
    if-eqz v13, :cond_15

    .line 407
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    .line 408
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    move-object v4, v0

    const-string v17, ""

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 409
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/htc/android/footprints/utils/camera/FootprintImageManager;->getDirectory()Ljava/lang/String;

    move-result-object v17

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v17, Ljava/io/File;->separator:Ljava/lang/String;

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/vo/Footprint;->mPicFileName:Ljava/lang/String;

    move-object/from16 v17, v0

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mPicPath:Ljava/lang/String;

    goto/16 :goto_0

    .line 416
    :cond_15
    if-eqz v15, :cond_16

    .line 417
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mSite:Ljava/lang/String;

    goto/16 :goto_0

    .line 418
    :cond_16
    if-eqz v10, :cond_17

    .line 419
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mComment:Ljava/lang/String;

    goto/16 :goto_0

    .line 420
    :cond_17
    if-eqz v9, :cond_18

    .line 421
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    move-object v0, v4

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mCategory:Ljava/lang/String;

    goto/16 :goto_0

    .line 422
    :cond_18
    if-eqz v7, :cond_19

    .line 423
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v4

    move v0, v4

    move-object/from16 v1, p0

    iput v0, v1, Lcom/htc/android/footprints/vo/Footprint;->mAccuracy:I

    goto/16 :goto_0

    .line 424
    :cond_19
    if-eqz v11, :cond_1a

    .line 425
    invoke-interface/range {v16 .. v16}, Lorg/xmlpull/v1/XmlPullParser;->getText()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v17

    move-wide/from16 v0, v17

    move-object/from16 v2, p0

    iput-wide v0, v2, Lcom/htc/android/footprints/vo/Footprint;->mCreateTime:J

    goto/16 :goto_0

    .line 426
    :cond_1a
    if-eqz v12, :cond_1

    goto/16 :goto_0

    :cond_1b
    move v4, v6

    .end local v6           #inPlacemark:Z
    .local v4, inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1

    .end local v4           #inPlacemark:Z
    .local v6, inPlacemark:Z
    .local v7, isAccuracy:Z
    .local v8, isAudio:Z
    .local v9, isCategory:Z
    .local v10, isComment:Z
    .local v11, isCreateTime:Z
    .local v12, isFootprintHashID:Z
    .local v13, isImage:Z
    .local v14, isRate:Z
    .restart local v15       #isWebSite:Z
    :cond_1c
    move v4, v6

    .end local v6           #inPlacemark:Z
    .restart local v4       #inPlacemark:Z
    move v6, v7

    .end local v7           #isAccuracy:Z
    .local v6, isAccuracy:Z
    move v7, v8

    .end local v8           #isAudio:Z
    .local v7, isAudio:Z
    move v8, v9

    .end local v9           #isCategory:Z
    .local v8, isCategory:Z
    move v9, v10

    .end local v10           #isComment:Z
    .local v9, isComment:Z
    move v10, v11

    .end local v11           #isCreateTime:Z
    .local v10, isCreateTime:Z
    move v11, v12

    .end local v12           #isFootprintHashID:Z
    .local v11, isFootprintHashID:Z
    move v12, v13

    .end local v13           #isImage:Z
    .local v12, isImage:Z
    move v13, v14

    .end local v14           #isRate:Z
    .local v13, isRate:Z
    move v14, v15

    .end local v15           #isWebSite:Z
    .local v14, isWebSite:Z
    goto/16 :goto_1
.end method

.method public static setProgressListener(Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;)V
    .locals 0
    .parameter "l"

    .prologue
    .line 488
    sput-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    .line 489
    return-void
.end method

.method public static writeToKMZ(Lcom/htc/android/footprints/kml/KMLDocument;Ljava/io/OutputStream;[Ljava/io/File;[Ljava/io/File;)V
    .locals 12
    .parameter "kmlDoc"
    .parameter "os"
    .parameter "images"
    .parameter "audios"

    .prologue
    .line 103
    const/4 v0, 0x0

    .line 105
    .local v0, out:Ljava/util/zip/ZipOutputStream;
    :try_start_0
    new-instance v4, Ljava/util/zip/ZipOutputStream;

    invoke-direct {v4, p1}, Ljava/util/zip/ZipOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_8

    .line 109
    .end local v0           #out:Ljava/util/zip/ZipOutputStream;
    .local v4, out:Ljava/util/zip/ZipOutputStream;
    :try_start_1
    new-instance p1, Ljava/util/zip/ZipEntry;

    .end local p1
    const-string v0, "doc.kml"

    invoke-direct {p1, v0}, Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, p1}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V

    .line 111
    new-instance v1, Ljava/io/StringReader;

    new-instance p1, Ljava/lang/String;

    invoke-virtual {p0}, Lcom/htc/android/footprints/kml/KMLDocument;->toString()Ljava/lang/String;

    move-result-object p0

    .end local p0
    invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B

    move-result-object p0

    const-string v0, "UTF-8"

    invoke-direct {p1, p0, v0}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    invoke-direct {v1, p1}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V

    .line 112
    .local v1, docReader:Ljava/io/StringReader;
    new-instance p1, Ljava/io/OutputStreamWriter;

    const-string p0, "UTF-8"

    invoke-direct {p1, v4, p0}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/lang/String;)V

    .line 114
    .local p1, cout:Ljava/io/OutputStreamWriter;
    const/16 p0, 0x2000

    invoke-static {p0}, Ljava/nio/CharBuffer;->allocate(I)Ljava/nio/CharBuffer;

    move-result-object p0

    .line 116
    .local p0, charBuffer:Ljava/nio/CharBuffer;
    :goto_0
    invoke-virtual {v1, p0}, Ljava/io/StringReader;->read(Ljava/nio/CharBuffer;)I

    move-result v0

    .local v0, c:I
    const/4 v2, -0x1

    if-eq v0, v2, :cond_1

    .line 117
    invoke-virtual {p0}, Ljava/nio/CharBuffer;->flip()Ljava/nio/Buffer;

    .line 118
    invoke-virtual {p0}, Ljava/nio/CharBuffer;->array()[C

    move-result-object v0

    .end local v0           #c:I
    invoke-virtual {p0}, Ljava/nio/CharBuffer;->arrayOffset()I

    move-result v2

    invoke-virtual {p0}, Ljava/nio/CharBuffer;->length()I

    move-result v3

    invoke-virtual {p1, v0, v2, v3}, Ljava/io/OutputStreamWriter;->write([CII)V

    .line 119
    invoke-virtual {p0}, Ljava/nio/CharBuffer;->clear()Ljava/nio/Buffer;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 207
    .end local v1           #docReader:Ljava/io/StringReader;
    .end local p0           #charBuffer:Ljava/nio/CharBuffer;
    .end local p1           #cout:Ljava/io/OutputStreamWriter;
    .end local p2
    .end local p3
    :catch_0
    move-exception p0

    move-object p1, v4

    .line 208
    .end local v4           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, e:Ljava/lang/Exception;
    .local p1, out:Ljava/util/zip/ZipOutputStream;
    :goto_1
    :try_start_2
    const-string p2, "KMLUtil"

    invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    .line 211
    if-eqz p1, :cond_0

    .line 213
    :try_start_3
    invoke-virtual {p1}, Ljava/util/zip/ZipOutputStream;->flush()V

    .line 214
    invoke-virtual {p1}, Ljava/util/zip/ZipOutputStream;->close()V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_4

    .line 220
    .end local p0           #e:Ljava/lang/Exception;
    :cond_0
    :goto_2
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz p0, :cond_10

    .line 221
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    const/16 p2, 0x64

    invoke-interface {p0, p2}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    .line 223
    const-wide/16 p2, 0x64

    :try_start_4
    invoke-static {p2, p3}, Ljava/lang/Thread;->sleep(J)V
    :try_end_4
    .catch Ljava/lang/InterruptedException; {:try_start_4 .. :try_end_4} :catch_5

    move-object p0, p1

    .line 230
    .end local p1           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    :goto_3
    return-void

    .line 121
    .restart local v0       #c:I
    .restart local v1       #docReader:Ljava/io/StringReader;
    .restart local v4       #out:Ljava/util/zip/ZipOutputStream;
    .local p0, charBuffer:Ljava/nio/CharBuffer;
    .local p1, cout:Ljava/io/OutputStreamWriter;
    .restart local p2
    .restart local p3
    :cond_1
    :try_start_5
    invoke-virtual {p1}, Ljava/io/OutputStreamWriter;->flush()V

    .line 122
    invoke-virtual {v1}, Ljava/io/StringReader;->close()V

    .line 126
    const/4 p0, 0x0

    .line 128
    .local p0, fileCount:I
    if-eqz p3, :cond_3

    .line 129
    move-object p1, p3

    .local p1, arr$:[Ljava/io/File;
    array-length v3, p1

    .local v3, len$:I
    const/4 v1, 0x0

    .local v1, i$:I
    move v2, v1

    .end local v1           #i$:I
    .local v2, i$:I
    move v1, p0

    .end local p0           #fileCount:I
    .local v1, fileCount:I
    :goto_4
    if-ge v2, v3, :cond_2

    aget-object p0, p1, v2

    .line 130
    .local p0, a:Ljava/io/File;
    invoke-virtual {p0}, Ljava/io/File;->exists()Z

    move-result p0

    .end local p0           #a:Ljava/io/File;
    if-eqz p0, :cond_17

    .line 131
    add-int/lit8 p0, v1, 0x1

    .line 129
    .end local v1           #fileCount:I
    .local p0, fileCount:I
    :goto_5
    add-int/lit8 v1, v2, 0x1

    .end local v2           #i$:I
    .local v1, i$:I
    move v2, v1

    .end local v1           #i$:I
    .restart local v2       #i$:I
    move v1, p0

    .end local p0           #fileCount:I
    .local v1, fileCount:I
    goto :goto_4

    :cond_2
    move p0, v1

    .line 136
    .end local v1           #fileCount:I
    .end local v2           #i$:I
    .end local v3           #len$:I
    .end local p1           #arr$:[Ljava/io/File;
    .restart local p0       #fileCount:I
    :cond_3
    if-eqz p2, :cond_5

    .line 137
    move-object p1, p2

    .restart local p1       #arr$:[Ljava/io/File;
    array-length v3, p1

    .restart local v3       #len$:I
    const/4 v1, 0x0

    .local v1, i$:I
    move v2, v1

    .end local v1           #i$:I
    .restart local v2       #i$:I
    move v1, p0

    .end local p0           #fileCount:I
    .local v1, fileCount:I
    :goto_6
    if-ge v2, v3, :cond_4

    aget-object p0, p1, v2

    .line 138
    .local p0, a:Ljava/io/File;
    invoke-virtual {p0}, Ljava/io/File;->exists()Z

    move-result p0

    .end local p0           #a:Ljava/io/File;
    if-eqz p0, :cond_16

    .line 139
    add-int/lit8 p0, v1, 0x1

    .line 137
    .end local v1           #fileCount:I
    .local p0, fileCount:I
    :goto_7
    add-int/lit8 v1, v2, 0x1

    .end local v2           #i$:I
    .local v1, i$:I
    move v2, v1

    .end local v1           #i$:I
    .restart local v2       #i$:I
    move v1, p0

    .end local p0           #fileCount:I
    .local v1, fileCount:I
    goto :goto_6

    :cond_4
    move p0, v1

    .line 144
    .end local v1           #fileCount:I
    .end local v2           #i$:I
    .end local v3           #len$:I
    .end local p1           #arr$:[Ljava/io/File;
    .restart local p0       #fileCount:I
    :cond_5
    const-wide v1, 0x4056800000000000L

    const/4 p1, 0x1

    sub-int/2addr p0, p1

    int-to-double p0, p0

    div-double v7, v1, p0

    .line 145
    .local v7, step:D
    const-wide/high16 p0, 0x4024

    add-double v5, p0, v7

    .line 146
    .local v5, progress:D
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    .end local p0           #fileCount:I
    if-eqz p0, :cond_6

    .line 147
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    double-to-int p1, v5

    invoke-interface {p0, p1}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    .line 153
    :cond_6
    const/16 p0, 0x2000

    new-array v9, p0, [B

    .line 155
    .local v9, tmpData:[B
    if-eqz p2, :cond_15

    .line 156
    move-object p0, p2

    .local p0, arr$:[Ljava/io/File;
    array-length v2, p0

    .local v2, len$:I
    const/4 p1, 0x0

    .local p1, i$:I
    move p2, v0

    .end local v0           #c:I
    .local p2, c:I
    move v0, p1

    .end local p1           #i$:I
    .local v0, i$:I
    :goto_8
    if-ge v0, v2, :cond_9

    aget-object v1, p0, v0

    .line 157
    .local v1, image:Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result p1

    if-eqz p1, :cond_14

    .line 158
    const-string p1, "KMLUtil"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "zip image:"

    invoke-virtual {v3, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v3, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {p1, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_0

    .line 161
    :try_start_6
    new-instance p1, Ljava/util/zip/ZipEntry;

    invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p1, v3}, Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, p1}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V

    .line 162
    new-instance p1, Ljava/io/BufferedInputStream;

    new-instance v3, Ljava/io/FileInputStream;

    invoke-direct {v3, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    invoke-direct {p1, v3}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V

    .line 164
    .end local v1           #image:Ljava/io/File;
    .local p1, bis:Ljava/io/BufferedInputStream;
    :goto_9
    invoke-virtual {p1, v9}, Ljava/io/BufferedInputStream;->read([B)I

    move-result p2

    const/4 v1, -0x1

    if-eq p2, v1, :cond_8

    .line 165
    const/4 v1, 0x0

    invoke-virtual {v4, v9, v1, p2}, Ljava/util/zip/ZipOutputStream;->write([BII)V
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_1

    goto :goto_9

    .line 169
    .end local p1           #bis:Ljava/io/BufferedInputStream;
    :catch_1
    move-exception p1

    move-object v11, p1

    move p1, p2

    .end local p2           #c:I
    .local p1, c:I
    move-object p2, v11

    .line 170
    .local p2, e:Ljava/lang/Exception;
    :try_start_7
    const-string v1, "KMLUtil"

    invoke-virtual {p2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v3

    invoke-static {v1, v3, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 174
    .end local p2           #e:Ljava/lang/Exception;
    :goto_a
    add-double/2addr v5, v7

    .line 175
    sget-object p2, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz p2, :cond_7

    .line 176
    sget-object p2, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    double-to-int v1, v5

    invoke-interface {p2, v1}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_0

    .line 156
    :cond_7
    :goto_b
    add-int/lit8 p2, v0, 0x1

    .end local v0           #i$:I
    .local p2, i$:I
    move v0, p2

    .end local p2           #i$:I
    .restart local v0       #i$:I
    move p2, p1

    .end local p1           #c:I
    .local p2, c:I
    goto :goto_8

    .line 167
    .local p1, bis:Ljava/io/BufferedInputStream;
    :cond_8
    :try_start_8
    invoke-virtual {v4}, Ljava/util/zip/ZipOutputStream;->flush()V

    .line 168
    invoke-virtual {p1}, Ljava/io/BufferedInputStream;->close()V
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_1

    move p1, p2

    .line 172
    .end local p2           #c:I
    .local p1, c:I
    goto :goto_a

    .end local p1           #c:I
    .restart local p2       #c:I
    :cond_9
    move-wide v2, v5

    .end local v5           #progress:D
    .local v2, progress:D
    move p1, p2

    .line 186
    .end local v0           #i$:I
    .end local p0           #arr$:[Ljava/io/File;
    .end local p2           #c:I
    .restart local p1       #c:I
    :goto_c
    if-eqz p3, :cond_13

    .line 187
    move-object p0, p3

    .restart local p0       #arr$:[Ljava/io/File;
    :try_start_9
    array-length v1, p0

    .local v1, len$:I
    const/4 p2, 0x0

    .local p2, i$:I
    move v0, p2

    .end local p2           #i$:I
    .restart local v0       #i$:I
    move p3, p1

    .end local p1           #c:I
    .local p3, c:I
    :goto_d
    if-ge v0, v1, :cond_e

    aget-object p1, p0, v0

    .line 188
    .local p1, audio:Ljava/io/File;
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result p2

    if-eqz p2, :cond_12

    .line 189
    const-string p2, "KMLUtil"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "zip audio:"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {p2, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 190
    new-instance p2, Ljava/util/zip/ZipEntry;

    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p2, v5}, Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, p2}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V

    .line 191
    new-instance p2, Ljava/io/BufferedInputStream;

    new-instance v5, Ljava/io/FileInputStream;

    invoke-direct {v5, p1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    invoke-direct {p2, v5}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V

    .local p2, bis:Ljava/io/BufferedInputStream;
    move p1, p3

    .line 193
    .end local p3           #c:I
    .local p1, c:I
    :goto_e
    invoke-virtual {p2, v9}, Ljava/io/BufferedInputStream;->read([B)I

    move-result p1

    const/4 p3, -0x1

    if-eq p1, p3, :cond_c

    .line 194
    const/4 p3, 0x0

    invoke-virtual {v4, v9, p3, p1}, Ljava/util/zip/ZipOutputStream;->write([BII)V
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_0

    goto :goto_e

    .line 211
    .end local v0           #i$:I
    .end local v1           #len$:I
    .end local v2           #progress:D
    .end local v7           #step:D
    .end local v9           #tmpData:[B
    .end local p0           #arr$:[Ljava/io/File;
    .end local p1           #c:I
    .end local p2           #bis:Ljava/io/BufferedInputStream;
    :catchall_0
    move-exception p0

    move-object p1, p0

    move-object p0, v4

    .end local v4           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    :goto_f
    if-eqz p0, :cond_a

    .line 213
    :try_start_a
    invoke-virtual {p0}, Ljava/util/zip/ZipOutputStream;->flush()V

    .line 214
    invoke-virtual {p0}, Ljava/util/zip/ZipOutputStream;->close()V
    :try_end_a
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_a} :catch_6

    .line 220
    .end local p0           #out:Ljava/util/zip/ZipOutputStream;
    :cond_a
    :goto_10
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz p0, :cond_b

    .line 221
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    const/16 p2, 0x64

    invoke-interface {p0, p2}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    .line 223
    const-wide/16 p2, 0x64

    :try_start_b
    invoke-static {p2, p3}, Ljava/lang/Thread;->sleep(J)V
    :try_end_b
    .catch Ljava/lang/InterruptedException; {:try_start_b .. :try_end_b} :catch_7

    .line 226
    :cond_b
    :goto_11
    throw p1

    .line 196
    .restart local v0       #i$:I
    .restart local v1       #len$:I
    .restart local v2       #progress:D
    .restart local v4       #out:Ljava/util/zip/ZipOutputStream;
    .restart local v7       #step:D
    .restart local v9       #tmpData:[B
    .local p0, arr$:[Ljava/io/File;
    .restart local p1       #c:I
    .restart local p2       #bis:Ljava/io/BufferedInputStream;
    :cond_c
    :try_start_c
    invoke-virtual {v4}, Ljava/util/zip/ZipOutputStream;->flush()V

    .line 197
    invoke-virtual {p2}, Ljava/io/BufferedInputStream;->close()V

    .line 198
    sget-object p2, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    .end local p2           #bis:Ljava/io/BufferedInputStream;
    if-eqz p2, :cond_d

    .line 199
    add-double p2, v2, v7

    .line 200
    .end local v2           #progress:D
    .local p2, progress:D
    sget-object v2, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    double-to-int v3, p2

    invoke-interface {v2, v3}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    move-wide v2, p2

    .line 187
    .end local p2           #progress:D
    .restart local v2       #progress:D
    :cond_d
    :goto_12
    add-int/lit8 p2, v0, 0x1

    .end local v0           #i$:I
    .local p2, i$:I
    move v0, p2

    .end local p2           #i$:I
    .restart local v0       #i$:I
    move p3, p1

    .end local p1           #c:I
    .restart local p3       #c:I
    goto :goto_d

    :cond_e
    move-wide p1, v2

    .end local v2           #progress:D
    .local p1, progress:D
    move p0, p3

    .line 206
    .end local v0           #i$:I
    .end local v1           #len$:I
    .end local p3           #c:I
    .local p0, c:I
    :goto_13
    const-wide/16 p0, 0x32

    invoke-static {p0, p1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_c
    .catchall {:try_start_c .. :try_end_c} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_c} :catch_0

    .line 211
    .end local p0           #c:I
    if-eqz v4, :cond_f

    .line 213
    :try_start_d
    invoke-virtual {v4}, Ljava/util/zip/ZipOutputStream;->flush()V

    .line 214
    invoke-virtual {v4}, Ljava/util/zip/ZipOutputStream;->close()V
    :try_end_d
    .catch Ljava/io/IOException; {:try_start_d .. :try_end_d} :catch_2

    .line 220
    .end local p1           #progress:D
    :cond_f
    :goto_14
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    if-eqz p0, :cond_11

    .line 221
    sget-object p0, Lcom/htc/android/footprints/kml/KMLUtil;->mListener:Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;

    const/16 p1, 0x64

    invoke-interface {p0, p1}, Lcom/htc/android/footprints/kml/KMLUtil$OnProgressListener;->onProgress(I)V

    .line 223
    const-wide/16 p0, 0x64

    :try_start_e
    invoke-static {p0, p1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_e
    .catch Ljava/lang/InterruptedException; {:try_start_e .. :try_end_e} :catch_3

    move-object p0, v4

    .line 226
    .end local v4           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_3

    .line 215
    .end local p0           #out:Ljava/util/zip/ZipOutputStream;
    .restart local v4       #out:Ljava/util/zip/ZipOutputStream;
    .restart local p1       #progress:D
    :catch_2
    move-exception p0

    .line 216
    .local p0, e:Ljava/io/IOException;
    const-string p1, "KMLUtil"

    .end local p1           #progress:D
    invoke-virtual {p0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_14

    .line 224
    .end local p0           #e:Ljava/io/IOException;
    :catch_3
    move-exception p0

    .line 225
    .local p0, e:Ljava/lang/InterruptedException;
    const-string p1, "KMLUtil"

    invoke-virtual {p0}, Ljava/lang/InterruptedException;->getMessage()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    move-object p0, v4

    .line 226
    .end local v4           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_3

    .line 215
    .end local v7           #step:D
    .end local v9           #tmpData:[B
    .local p0, e:Ljava/lang/Exception;
    .local p1, out:Ljava/util/zip/ZipOutputStream;
    :catch_4
    move-exception p0

    .line 216
    .local p0, e:Ljava/io/IOException;
    const-string p2, "KMLUtil"

    invoke-virtual {p0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_2

    .line 224
    .end local p0           #e:Ljava/io/IOException;
    :catch_5
    move-exception p0

    .line 225
    .local p0, e:Ljava/lang/InterruptedException;
    const-string p2, "KMLUtil"

    invoke-virtual {p0}, Ljava/lang/InterruptedException;->getMessage()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    move-object p0, p1

    .line 226
    .end local p1           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_3

    .line 215
    :catch_6
    move-exception p0

    .line 216
    .local p0, e:Ljava/io/IOException;
    const-string p2, "KMLUtil"

    invoke-virtual {p0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_10

    .line 224
    .end local p0           #e:Ljava/io/IOException;
    :catch_7
    move-exception p0

    .line 225
    .local p0, e:Ljava/lang/InterruptedException;
    const-string p2, "KMLUtil"

    invoke-virtual {p0}, Ljava/lang/InterruptedException;->getMessage()Ljava/lang/String;

    move-result-object p3

    invoke-static {p2, p3, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_11

    .line 211
    .local v0, out:Ljava/util/zip/ZipOutputStream;
    .local p0, kmlDoc:Lcom/htc/android/footprints/kml/KMLDocument;
    .local p1, os:Ljava/io/OutputStream;
    .local p2, images:[Ljava/io/File;
    .local p3, audios:[Ljava/io/File;
    :catchall_1
    move-exception p0

    move-object p1, p0

    move-object p0, v0

    .end local v0           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_f

    .end local p2           #images:[Ljava/io/File;
    .end local p3           #audios:[Ljava/io/File;
    .local p0, e:Ljava/lang/Exception;
    .local p1, out:Ljava/util/zip/ZipOutputStream;
    :catchall_2
    move-exception p0

    move-object v11, p0

    move-object p0, p1

    .end local p1           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    move-object p1, v11

    goto/16 :goto_f

    .line 207
    .restart local v0       #out:Ljava/util/zip/ZipOutputStream;
    .local p0, kmlDoc:Lcom/htc/android/footprints/kml/KMLDocument;
    .local p1, os:Ljava/io/OutputStream;
    .restart local p2       #images:[Ljava/io/File;
    .restart local p3       #audios:[Ljava/io/File;
    :catch_8
    move-exception p0

    move-object p1, v0

    .end local v0           #out:Ljava/util/zip/ZipOutputStream;
    .local p1, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_1

    .end local p0           #kmlDoc:Lcom/htc/android/footprints/kml/KMLDocument;
    .end local p2           #images:[Ljava/io/File;
    .end local p3           #audios:[Ljava/io/File;
    :cond_10
    move-object p0, p1

    .end local p1           #out:Ljava/util/zip/ZipOutputStream;
    .local p0, out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_3

    .end local p0           #out:Ljava/util/zip/ZipOutputStream;
    .restart local v4       #out:Ljava/util/zip/ZipOutputStream;
    .restart local v7       #step:D
    .restart local v9       #tmpData:[B
    :cond_11
    move-object p0, v4

    .end local v4           #out:Ljava/util/zip/ZipOutputStream;
    .restart local p0       #out:Ljava/util/zip/ZipOutputStream;
    goto/16 :goto_3

    .local v0, i$:I
    .restart local v1       #len$:I
    .restart local v2       #progress:D
    .restart local v4       #out:Ljava/util/zip/ZipOutputStream;
    .local p0, arr$:[Ljava/io/File;
    .local p1, audio:Ljava/io/File;
    .local p3, c:I
    :cond_12
    move p1, p3

    .end local p3           #c:I
    .local p1, c:I
    goto/16 :goto_12

    .end local v0           #i$:I
    .end local v1           #len$:I
    .end local p0           #arr$:[Ljava/io/File;
    .local p3, audios:[Ljava/io/File;
    :cond_13
    move p0, p1

    .end local p1           #c:I
    .local p0, c:I
    move-wide p1, v2

    .end local v2           #progress:D
    .local p1, progress:D
    goto/16 :goto_13

    .end local p1           #progress:D
    .restart local v0       #i$:I
    .local v1, image:Ljava/io/File;
    .local v2, len$:I
    .restart local v5       #progress:D
    .local p0, arr$:[Ljava/io/File;
    .local p2, c:I
    :cond_14
    move p1, p2

    .end local p2           #c:I
    .local p1, c:I
    goto/16 :goto_b

    .end local v1           #image:Ljava/io/File;
    .end local v2           #len$:I
    .end local p0           #arr$:[Ljava/io/File;
    .end local p1           #c:I
    .local v0, c:I
    .local p2, images:[Ljava/io/File;
    :cond_15
    move-wide v2, v5

    .end local v5           #progress:D
    .local v2, progress:D
    move p1, v0

    .end local v0           #c:I
    .restart local p1       #c:I
    goto/16 :goto_c

    .end local v7           #step:D
    .end local v9           #tmpData:[B
    .restart local v0       #c:I
    .local v1, fileCount:I
    .local v2, i$:I
    .restart local v3       #len$:I
    .local p1, arr$:[Ljava/io/File;
    :cond_16
    move p0, v1

    .end local v1           #fileCount:I
    .local p0, fileCount:I
    goto/16 :goto_7

    .end local p0           #fileCount:I
    .restart local v1       #fileCount:I
    :cond_17
    move p0, v1

    .end local v1           #fileCount:I
    .restart local p0       #fileCount:I
    goto/16 :goto_5
.end method
